#! /bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
JDK_HOME=$DIR/jdk/jdk1.8.0_66
python agent/main/server.py > $DIR/logs/agent.log&
echo 'See agent log at '$DIR'/logs/agent.log'
sleep 2s
$JDK_HOME/bin/java -jar ncc-proxy.jar > $DIR/logs/proxy.log&
echo 'See proxy log at '$DIR'/logs/proxy.log'
sleep 2s
$JDK_HOME/bin/java -jar ncc-rest.jar --port 9999 > $DIR/logs/rest.log&
echo 'See rest log at '$DIR'/logs/rest.log'
sleep 2s
$JDK_HOME/bin/java -jar ncc-dashboard.jar --port 7777 > $DIR/logs/dashboard.log&
echo 'See dashboard log at '$DIR'/logs/dashboard.log'
echo success